const utils = {}
// 判断会员
utils.judgeVip = (url,elseUrl) => {
  let page = this;
  let userinfo = JSON.parse(sessionStorage.getItem('userinfo'));

  if (userinfo.vipcode) {
    this.$router.push(url)
  } else {
      Toast({
          message: '您还不是会员，快去注册吧！',
          duration: 2000
      });
      setTimeout(function () {
          page.$router.push(elseUrl)
      }, 2000)
  }
}

export default utils
